<div id="media">
    <div id="media_border">
        <img src="<?php echo Utility::getSiteUrl();?>/public/images/media.png"/>
    </div>
    <div id="media_img">
        <?php
            if(isset($album_items) && $album_items->getSize() > 0)
        {
        $item = $album_items->getRow(0);
        ?>
        <img id="media_image" src="<?php echo Utility::getSiteUrl() . '/public/images/' . $item->image;?>"
             onclick="showImage(this.src)";
        />
        <?php
            }
        ?>
    </div>
</div>
<div id="content">
    <div id="head_content">
        <div id="left_head_content">
            <a class="prevPage  left"></a>

            <div class="scrollable">
                <div class="items">
                    <?php
                    if(isset($album_items))
                    {
                        $size = $album_items->getSize();
                    for($i = 0;$i < $size; $i++)
                    {
                    $item = $album_items->getRow($i);
                    ?>
                    <img src="<?php echo Utility::getSiteUrl() . '/public/images/' . $item->image;?>"
                         onclick="showImage(this.src)"; />
                    <?php
                        }
                    }
                    ?>
                </div>
            </div>
            <a class="nextPage right"></a>
        </div>
        <script>
            $(function()
            {
                $("div.scrollable").scrollable({size: 4});
            });
        </script>
        <div id="right_head_content">
            <h4>Điểm tin</h4>
        </div>
        <div class="vide"></div>
    </div>
    <div id="body_content">
        <?php
        if(isset($lastest_news) && $lastest_news->getSize() > 0)
        {
            $size = $lastest_news->getSize();
            for($i = 0 ; $i < $size; $i++)
            {
            $news = $lastest_news->getRow($i);
            ?>
        <div class='category_detail'>
            <div class='content_img'>
                <img
                    src="<?php echo (strlen($news->avatar) != 0?$news->avatar:Utility::getSiteUrl() . '/public/images/default.png'); ?>"
                    alt='nothing is impossible'/>
            </div>
            <div class='content_list'>
                <div class='title_news'><a
                    href="<?php echo Utility::getSiteUrl() . '/news/show/' . $news->id;?>"> <?php echo $news->title;
                    ?></a></div>
                <div class='summary_news'>
                    <span><?php echo $news->summary; ?></span>
                </div>
            </div>
            <div class='time'><?php echo $news->p_date; ?></div>
            <div class="vide"></div>
        </div>
            <?php
            }
        }
        else
        {
            ?>
            <span style="color:black;font-weight:bold;">Chưa có bài viết ở mục này</span>
            <?php
        }
        ?>


    </div>
    <div id="foot_content">
        <!--<div id="previous">
            <a href="#">Previous</a>
        </div>
        <div id="next">
            <a href="#">Next</a>
        </div>-->
    </div>
</div>
</div>